{include file="/sum/common/script" /}

<div id="addEdit" class="faq-form" v-cloak>
    <el-container class="panel-block">
        <el-main>
            <el-scrollbar height="100%">
                <el-form :model="form.model" :rules="form.rules" ref="formRef" label-width="100px">

                    <el-form-item label="任务类型">
                        <el-radio-group v-model="form.model.type">
                            <el-radio label="first">首次</el-radio>
                            <el-radio label="day">每日</el-radio>
                        </el-radio-group>
                    </el-form-item>

                    <el-form-item label="标题" prop="title">
                        <el-input class="sa-w-360" v-model="modelTitle" placeholder="请输入标题">
                            <template #prepend>
                                <el-select v-model="language.field_key.title" placeholder="Select" style="width: 115px">
                                    <el-option v-for="(item,index) in language.option" :key="index" :label="item.title" :value="index" />
                                </el-select>
                            </template>
                        </el-input>
                    </el-form-item>

                    <el-form-item label="事件" prop="hook">
                        <div class="sa-w-360">
                            <el-select v-model="form.model.hook" placeholder="请选择事件">
                                <el-option v-for="item in hook.data" :key="item.type" :label="item.name"
                                           :value="item.type"></el-option>
                            </el-select>
                        </div>
                    </el-form-item>


                    <el-form-item label="金币" prop="score">
                        <el-input class="sa-w-360" v-model="form.model.score" placeholder="请输入赠送金币" type="number" step="1">
                        </el-input>
                    </el-form-item>

<!--                    <el-form-item label="扩展属性" prop="title">-->
<!--                        <el-input class="sa-w-360" v-model="form.model.extend" placeholder="请输入扩展属性"></el-input>-->
<!--                        <div class="warning"> 观看视频任务的分钟数;累计签到任务的天数;榜单任务的排名数 </div>-->
<!--                    </el-form-item>-->

                    <el-form-item label="是否推荐">
                        <el-switch v-model="form.model.is_recommend" :active-value="1" :inactive-value="0"></el-switch>
                    </el-form-item>
<!--                    <el-form-item label="排序" prop="weigh">-->
<!--                        <el-input class="sa-w-360" v-model="form.model.weigh" placeholder="请输入排序" type="number">-->
<!--                        </el-input>-->
<!--                        <div class="warning"> 排序的大小默认按照从大到小排列 </div>-->
<!--                    </el-form-item>-->
                    <el-form-item label="状态" required>
                        <el-radio-group v-model="form.model.status">
                            <el-radio label="normal">正常</el-radio>
                            <el-radio label="hidden">隐藏</el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-form>
            </el-scrollbar>
        </el-main>
        <el-footer class="sa-footer--submit sa-flex sa-row-right">
            <el-button type="primary" @click="onConfirm">确定</el-button>
        </el-footer>
    </el-container>
</div>